package e

var MsgFlags = map[int]string{
	SUCCESS:                        "success",
	ERROR:                          "fail",
	ERROR_DATA_TYPE_MISMATCH:       "数据类型不匹配,输入值的类型与期望类型不符",
	INVALID_PARAMS:                 "请求参数错误！",
	ERROR_EXIST_TAG:                "已存在该标签名称！",
	ERROR_NOT_EXIST_TAG:            "该标签不存在！",
	ERROR_NOT_EXIST_ARTICLE:        "该数据不存在！",
	ERROR_EXIST_PARAMS:             "数据已存在！",
	ERROR_AUTH_CHECK_TOKEN_FAIL:    "Token 鉴权失败！",
	ERROR_AUTH_CHECK_TOKEN_TIMEOUT: "访问已超时！",
	ERROR_AUTH_TOKEN:               "Token生成失败！",
	ERROR_AUTH:                     "Token错误！",
	PAGE_NOT_FOUND:                 "Page not found",
	ERROR_PASS:                     "密码错误！",
	ERROR_PAY_already_exist:        "无需重复购买",
	ERROR_ADD:                      "add information failed",
	ERROR_AUTH_PERMISSION:          "Deficiency of equity",
	ERROR_MEMBER_NOT_CREDITS:       "是会员但没有剩余点数",
	ERROR_NOT_MEMBER_HAVE_CREDITS:  "非会员但有剩余点数",
	ERROR_NOT_MEMBER_NOT_CREDITS:   "非会员且无剩余点数",
}

func GetMsg(code int) string {
	msg, ok := MsgFlags[code]
	if ok {
		return msg
	}

	return MsgFlags[ERROR]
}
